xxx===============
Question
---------------------------
Answer
===============

How to Check Your HW Submission
-----------------------------------------------

A good Public Key should look like this (between the []s), before you encrypt your message to me:

[
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.5 (Cygwin)

mQGiBEe6Uj4RBACnFyl0KeW9xje2AdrUMFuIVvtRYs8GWrEfNm+Kmy21srY0DAfn

... (omitted base64 lines, like above) ...

R7pSQgIbDAAKCRBIN8+2G96IXJS4AJ0QZ26gCzT44i8oSCHKoghvKwVQsQCaA0V3
WjyYhT+bfMxEbb/SPWuYF5c=
=9nTs
-----END PGP PUBLIC KEY BLOCK--         
]

Blank lines are ok.
++++++++++

A good "encrypted and signed" message body should look like this ("Version:" can be different, and the "Charset: ..." line may not be present):

-----BEGIN PGP MESSAGE-----
Version: PGP Desktop 9.8.0 (Build 2158)
Charset: utf-8

qANQR1DBwE4Dvb9/FN0FMeAQA/4iLHUTpUb/0V7VOkmFw0wkVdkOwpOho5Nrpx5u
Xr0vcTkpWobFrsJbMobx8XspzEq1mqxuJXrN4asZwqdK60r11tKN9uWRahLhzr5u

... (omitted base64 lines, like above) ...

CLcN7nfbSN2XkVjMrDh/KJ4Fcca16tfckhy7ulHAKbUE2S6Uo++PwK1oX+Vrp6qz
n/u6DhL07P65SfzUs4w=
=D/H1
-----END PGP MESSAGE-----

There should not be an attached file.
++++++++++++++

The lines with dashes (----) must be there at the beginning and end, but only a single line.  If you see this below, you encrypted first, and then signed.  Use PGP or GPG to "Sign and Encrypt" in a single operation.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- -----BEGIN PGP MESSAGE-----                             {note: "- " at beginning of line is not good"}
Version: GnuPG v1.4.7 (MingW32) - WinPT 1.2.0

QANmd63baXs5YxBB4SDWR0b/ukiOsLWsaYAQrt0vSt7BoFwqbxhkxHqBfGK8W8IS
5RFYMz8dNYBMkS5C2C6N2YUA8/L5KaOx7IsulFjdcnWbXoH3j6RIybojXHjOSAHl
kkRMoexRrpUr3CL+znZaYIrnMv0cSRzeTUni1dDOoc95V4dByGHsesUepEyEQyWR
Db15VFsDNWrg4ePq0X3LeLpUUkJsdAXmFJFXVPwMiiFwORsNgnbojOq1X8u0omWi
... (omitted base64 lines, like above) ...
DBj2p8pzPPyw7zo5Bace7j0NDsO/CAI93SPq6Rr21QA+D0/XseS7A2G+WHivISg0
mlWFydR9KAYqmg==
=iH/0
- -----END PGP MESSAGE-----
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32) - WinPT 1.2.0

iD8DBQFHvKnfOazmrxonY2gRAp0eAJ9HMJPNo1QVb+xxYmlld0+PvNodSgCfRv1A
l/JACdfb9ECWaPa5K3rEAfk=
=XV2A
-----END PGP SIGNATURE-----

==============

I am not sure why my text was 'wrapped'. I don't know how to check if there are
line breaks in my encrypted file. To encrypt the file previously, I was using
GPA. I would go to 'Windows', then 'Filemanager' on the toolbar and encrypted
the file using that window.

------------------------------

GnuPG puts a Unix style line break at the end of each line of the public key copied to the clipboard. Windows Notepad,
removes these non-standard line breaks when saving the file, without asking. (see notepad++ use, below)

========================
Simply right clicking on the txt file and hitting 'Sign and Encrypt' from the
drop down menu didn't work because the keys weren't showing up in the
'Sign/Encrypt' window as it is supposed to. By chance when I tried it today, it
worked and I am hoping that the encrypted message hasn't been wrapped.

---------------------

I assume you are using Windows. 

You should "export" your public key as a text file (pub-key.txt or pub-key.asc).

Use "Notepad++" rather than "Word" or "Notepad".  "Notepad++" is even safer - http://en.wikipedia.org/wiki/Notepad++

Open a blank document.  Copy and paste my HW-3 email (or from the class Web site) into this document.  

Then open  the Public Key file in a different window.  Copy and paste the Public Key between the square brackets in the HW-3 document (including the "-----BEGIN", "VERSION", and "-----END" lines).

You should see the separate lines at this point.  Save as "hw3.txt".  Use GPG to "Sign/Encrypt" this file into "hw3.asc".

Open "hw3.asc" in Notepad.  This file should have the "-----BEGIN PGP ..." first line, and "------END PGP ..." last line. The bulk of the file should be base64, 72-character lines.  Copy all and paste it into your email message to me.  Be sure to "Send as Text".

=============

>When signing the document, should I just include my signature at the bottom of the original document and then encrypt all of it with your private key? If I am in error, please let me know.

-------------------

The PGP or GPG program will sign and encrypt the text file in one operation.  You may have to specify that you want the result to be a text file (.asc or .txt).

If you make a binary file (.pgp or .bin), then you can not paste it in to the body of an email message.  An attached file, binary or text, will not be accepted for HW-2.

===========

>Regarding hw 2, How do I make public my public-key. I know yours is in your Website, but mine is not public yet. Do I need to send it to you in plain text? - or is there another way to make it public?
--------------------

You make your key public by emailing it to likely correspondents, like myself.  Do not worry about it being in the clear, you want it to be public.

For HW-2 you are going to encrypt it in the message, but that is just so you don't have to send two messages.

PGP, Inc.  (http://www.pgp.com) has a Key Registry (ldap.pgp.com) where you can list your key and search for other people's keys by their email address. There is no verification, except that whoever listed the key will probably get email sent to the corresponding email address.

OIT employees have their public key "finger prints" on their business cards.

You can include the key as part of your email "signature," or include a Web link as I do: http://www.csc.gatech.edu/copeland/jac/PGP_Key.html

=================

I've been following the windows GPG tutorial at your website
(http://www.csc.gatech.edu/copeland/jac/6612/pgp/2006_gpg_Windows.html)
to do the hw but I've ran into a couple of problems:

i) I couldn't get either your or my key to appear in the Sign/Encrypt
Files menu.

--------
 You have to enable the keys from the key management window. 
This is done by right-clicking the key and selecting enable from the menu.

========================

ii) I tried to sign and encrypt the text file using the GNU Privacy
Assistant File Manager and it worked fine except that I got an error
message when I tried to decrypt the message.

I've basically inserted my public key in the text file
containing the homework details and I've signed it before encrypted it
with your public key.

=========

You should "Sign/Encrypt" in a single operation.  If you add or delete a character, even a space of line-feed, after signing, the signature will not be valid.

----------
You should check the "Text Output (ASCII Amour)" box above.

=========================
 
I have installed Gnu Privacy Assistant from GPG4WIN.org.   And I figured out that under the "Filemanager" menu you can encrypt and sign documents with one operation.  However, the output file is a .gpg file and definitely not regular text when I open it in a text editor.  However, looking through all of the options in the GUI, I can't find the button to output it as text only.  Are you familiar with this program?

--------------

CREATING A TEXT (.asc) FILE

The option is called "Text option (ASCII Armor)"
It is under the "Misc. Options" category. See below.